import request from '@/utils/request'

// 查询开药记录列表
export function listAbnormalPrescription(query) {
  return request({
    url: '/medical/abnormalPrescription/list',
    method: 'get',
    params: query
  })
}

// 查询开药记录详细
export function getAbnormalPrescription(id) {
  return request({
    url: '/medical/abnormalPrescription/' + id,
    method: 'get'
  })
}

// 新增开药记录
export function addAbnormalPrescription(data) {
  return request({
    url: '/medical/abnormalPrescription',
    method: 'post',
    data: data
  })
}

// 修改开药记录
export function updateAbnormalPrescription(data) {
  return request({
    url: '/medical/abnormalPrescription',
    method: 'put',
    data: data
  })
}

// 删除开药记录
export function delAbnormalPrescription(id) {
  return request({
    url: '/medical/abnormalPrescription/' + id,
    method: 'delete'
  })
}
